package com.example.xcxhouduan.demos.controller;

import com.example.xcxhouduan.bean.DataResponse;
import com.example.xcxhouduan.bean.Restaurants;
import com.example.xcxhouduan.service.DataService;
import com.example.xcxhouduan.service.restService;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/api")
public class testController {
    @Autowired
    private DataService dataService;
    @GetMapping("/products")
    public String hello() throws JsonProcessingException {
        return dataService.getEmptyProduct();
    }
}
